import 'package:gold/generated/json/base/json_field.dart';
import 'package:gold/generated/json/gold_price_model.g.dart';
import 'dart:convert';
export 'package:gold/generated/json/gold_price_model.g.dart';

@JsonSerializable()
class GoldPriceModel {
	int? success;
	int? msgid;
	GoldPriceResult? result;

	GoldPriceModel();

	factory GoldPriceModel.fromJson(Map<String, dynamic> json) => $GoldPriceModelFromJson(json);

	Map<String, dynamic> toJson() => $GoldPriceModelToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class GoldPriceResult {
	String? dtQuery;
	String? dtCount;
	Map<String, GoldPriceResultDt>? dtList;

	GoldPriceResult();

	factory GoldPriceResult.fromJson(Map<String, dynamic> json) => $GoldPriceResultFromJson(json);

	Map<String, dynamic> toJson() => $GoldPriceResultToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class GoldPriceResultDt {
	String? goldid;
	String? variety;
	String? varietynm;
	@JSONField(name: 'last_price')
	String? lastPrice;
	@JSONField(name: 'buy_price')
	String? buyPrice;
	@JSONField(name: 'sell_price')
	String? sellPrice;
	@JSONField(name: 'open_price')
	String? openPrice;
	@JSONField(name: 'yesy_price')
	String? yesyPrice;
	@JSONField(name: 'high_price')
	String? highPrice;
	@JSONField(name: 'low_price')
	String? lowPrice;
	@JSONField(name: 'change_price')
	String? changePrice;
	@JSONField(name: 'change_margin')
	String? changeMargin;
	String? uptime;

	GoldPriceResultDt();

	factory GoldPriceResultDt.fromJson(Map<String, dynamic> json) => $GoldPriceResultDtFromJson(json);

	Map<String, dynamic> toJson() => $GoldPriceResultDtToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}